Feature/issue 2 additive resume - #4
Open
piscoTech wants to merge 10 commits into
Open
Conversation
…into feature/issue-2-additive-resume
Python Preview Packages — Publish FailedPreview publish failed for commit 4ad5bb7. |
@ag-ui/a2a-middleware
@ag-ui/a2ui-middleware
@ag-ui/event-throttle-middleware
@ag-ui/mcp-apps-middleware
@ag-ui/mcp-middleware
@ag-ui/adk
@ag-ui/ag2
@ag-ui/a2a
@ag-ui/agno
@ag-ui/aws-strands
@ag-ui/claude-agent-sdk
@ag-ui/claude-managed-agents
@ag-ui/crewai
@ag-ui/langchain
@ag-ui/langgraph
@ag-ui/llamaindex
@ag-ui/mastra
@ag-ui/pydantic-ai
@ag-ui/vercel-ai-sdk
@ag-ui/watsonx
@ag-ui/a2ui-toolkit
create-ag-ui-app
@ag-ui/client
@ag-ui/core
@ag-ui/encoder
@ag-ui/proto
commit: |
piscoTech
marked this pull request as ready for review
August 6, 2026 12:59
…into feature/issue-2-additive-resume
piscoTech
pushed a commit
that referenced
this pull request
Aug 10, 2026
…nd hand-off Rebuilt cleanly on top of ag-ui-protocol#2334 (which landed the halt-path fixes #1/#2). This change carries only the two independent pieces: Fix #4 — _normalize_tool_turns (called at the end of _build_strands_history): - iterative merge (no RecursionError on large histories, ~1000+ tool turns) - de-duplicate toolUseIds so a repeated id never emits a duplicate toolResult (Bedrock rejects that) - preserve messages that legitimately follow a completed toolUse/toolResult pair in place; only drop messages wedged between the turn and its results Fix #3 — defer frontend hand-off: - buffer a frontend tool's ToolCallEnd instead of emitting it immediately - flush the buffer after the turn's backend TOOL_CALL_RESULT(s), so the wire order is backend result -> frontend end and the client only starts the frontend tool once backend work has reached it - safety flush at end of stream for turns with only frontend tool calls, so a buffered end is never lost (no TOOL_CALL_START left without a matching END) Adds regression tests: normalize recursion/dedup/follow-ordering and the deferred-end flush order. Full aws-strands suite green. Signed-off-by: YiyuanMiao <miaoyiyuan31@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue 2 of ag-ui-protocol#2286 (comment)